<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      width: 100vw;
      height: 100vh;
      background: #34495e;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .heart {
      width: 200px;
      height: 200px;
      background: #e74c3c;
      transform: rotate(45deg) scale(0.5);
      animation-name: ani;
      animation-duration: 2s;
      animation-iteration-count: infinite;
      /* animation-fill-mode: forwards; */
    }
    @keyframes ani {
      25% {
        transform: rotate(45deg) scale(0.5);
      }
      50% {
        transform: rotate(45deg) scale(1.5);
      }
      75% {
        transform: rotate(45deg) scale(0.5);
      }
      85% {
        transform: rotate(45deg) scale(1);
      }
      to{
        transform: rotate(45deg) scale(1.5);
      }
    }
    .heart::before {
      content: '';
      position: absolute;
      width: 200px;
      height: 200px;
      border-radius: 50%;
      background: #e74c3c;
      transform: translateX(-100px);
    }
    .heart::after {
      content: '';
      position: absolute;
      width: 200px;
      height: 200px;
      border-radius: 50%;
      background: #e74c3c;
      transform: translateY(-100px);
    }
  </style>
</head>
<body>
  <div class="heart"></div>
</body>
</html>